﻿<UserControl x:Class="ScrumFactory.Team.JoinDialog"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:props="clr-namespace:ScrumFactory.Team.Properties"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <StackPanel Orientation="Vertical">
        <Grid Width="400" Margin="10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>               
            </Grid.RowDefinitions>

            <TextBlock 
            Grid.Column="0" Grid.Row="0"
            Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.As}">
            <TextBlock Style="{StaticResource LabelHelp}" Text="{x:Static props:Resources.As_LABELHELP}"/>
        </TextBlock>
            <TextBlock 
            Grid.Column="0" Grid.Row="1"
            Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.Allocation}">
            <TextBlock  Style="{StaticResource LabelHelp}" Text="{x:Static props:Resources.Allocation_LABELHELP}"/>
        </TextBlock>
            <ComboBox 
            Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch"
            ItemsSource="{Binding Roles}"
            SelectedItem="{Binding SelectedRole}"
            DisplayMemberPath="RoleName" SelectedValuePath="RoleUId"/>
            <ComboBox 
            Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Margin="3,3,3,10"
            SelectedValue="{Binding Allocation}" IsEnabled="True"
            Style="{StaticResource MemberAllocationComboBox}"/>
         
        </Grid>

        <Border
                HorizontalAlignment="Stretch" 
                Background="{StaticResource WindowButtonBar}"
                >

            <Button
                    MinWidth="80" Margin="5" HorizontalAlignment="Center"
                    Command="{Binding JoinProjectCommand}"
                    Content="{x:Static props:Resources.Join}"/>
        </Border>

    </StackPanel>
    
</UserControl>
